package java69.work720;

public class Animal {
    protected String name;

    public Animal(String name) {
        this.name = name;
    }

    public Animal() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    protected void self(){
        System.out.println("我是"+getName());
    }

    protected void sleep(){
        System.out.println("我需要睡觉");
    }

    protected  void eat(String animal){
        System.out.println("我的食物是："+animal);

    }
}
